﻿CREATE PROCEDURE [dbo].[AddParticipant]
    @ParticipantId uniqueidentifier,
	@Activity uniqueidentifier,
	@Person uniqueidentifier,
	@BusinessRole uniqueidentifier,
    @CreatedBy uniqueidentifier,
    @IsDeleted bit,
	@CreatedOn datetime,
    @LastChanged datetime,
	@LastChangedBy uniqueidentifier,

	@TimeStamp timestamp output

AS

	INSERT INTO Participant 

	(ParticipantId, Activity, Person, BusinessRole, CreatedBy, IsDeleted, CreatedOn, LastChanged, LastChangedBy)

	VALUES 

	(@ParticipantId, @Activity, @Person, @BusinessRole, @CreatedBy, @IsDeleted, @CreatedOn, @LastChanged, @LastChangedBy)

	SELECT @TimeStamp = [TimeStamp]

	FROM Participant WHERE ParticipantId=@ParticipantId

RETURN 0